package com.bw.user.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bw.core.result.ResponseResult;
import com.bw.user.pojo.TbCallBookAuth;
import com.bw.user.mapper.TbCallBookAuthMapper;
import com.bw.user.service.TbBankCardAuthService;
import com.bw.user.service.TbCallBookAuthService;
import com.bw.user.vo.CallbookVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 通讯录认证&信息 服务实现类
 * </p>
 *
 * @author lv
 * @since 2021-03-23
 */
@Service
public class TbCallBookAuthServiceImpl extends ServiceImpl<TbCallBookAuthMapper, TbCallBookAuth> implements TbCallBookAuthService {

    @Autowired
    private TbCallBookAuthMapper callBookAuthMapper;

    @Override
    public ResponseResult callbook(CallbookVo callbookVo) {

        for(int i=0;i<20;i++){
            TbCallBookAuth callBookAuth = new TbCallBookAuth();
            callBookAuth.setCallBookName("zs"+i+i);
            callBookAuth.setCallBookPhone("1321456"+i+"345");
            callBookAuth.setUserId(callbookVo.getUserid());
            callBookAuth.setUserName(callbookVo.getUsername());
            callBookAuth.setUserPhone(callbookVo.getPhone());

            callBookAuthMapper.insert(callBookAuth);
        }

        return ResponseResult.success();
    }
}
